package com.git.contractmanagement.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        // ✅ 映射 /image/** 到项目根目录下的 image 文件夹
        registry.addResourceHandler("/uploads/**")
                .addResourceLocations("file:D:/app/uploads/avatar/");
    }
}
